$(function(){	
	var p=1;
	function list_qb(p){
		var d={};
		d.page=p;
		d.token=token;
		$.ajax({
		    type:"post",
		    url:url+'/user/notice.html?token='+token,
		    async:false,
		    data:d,
		    dataType:'json',
		    success:function(result){
		        if(result.status === "0001"){
		        	var data=result.data;
		        	var html = '';
		        	for(var i in data){
		        		html += '<a style="cursor:pointer;" onclick="javascript:mass(this);" data-id="'+data[i].id+'" class="mygg_link">'+data[i].title+' <span>'+data[i].created_at+'</span></a>';
		        	}
		        	if (html == "" || data.length < 10) {
						$('.notMore').css('display',"block")
					}
		        	$(".mygg_list").append(html);
		        	
		        }else{
		            isErr(result);
		        }
		    },
			error:function(){
				layer.msg("响应失败");
			}
		})
	}
	list_qb(1);
	//	下拉加载更多
	$(window).scroll(function() {
		if ($(document).scrollTop() >= $(document).height() - $(window).height() - 70) {			
		// console.log('我到底了');
			if ($('.notMore').css('display') != "block") {
				p++;
				list_qb(p);
			}
		}
	})
	

})
function mass(d){
  location.href="gg_details.html?mid="+$(d).attr("data-id");
}
	